from base.baseapi import BaseApi
import requests

"""
WeWork工具类继承了baseapi
方法以来发生request请求来获取token
"""
class WeWork(BaseApi):

    def get_token(self, secret):
        corpid = 'ww731c7b7d5fed7151'
        corpsecret = secret
        data = {
            "method": "get",
            "url": "https://qyapi.weixin.qq.com/cgi-bin/gettoken",
            "params": {
                "corpid": corpid,
                "corpsecret": corpsecret

        }}

        return self.send(data)["access_token"]

